package java.hilyb.dbtest.domain;

/**
 * User: wlai
 * Date: 12/8/2014
 * Time: 15:37 PM
 */
public class Category {
    public static final String TABLE_NAME = "T_CATEGORY";
    public static final String C_ID = "ID";
    public static final String C_NAME = "NAME";
    public static final String C_PARENT="P_ID";
    public static final String C_PICID="PIC_ID";
    public static final String CREATE_TABLE_SQL = "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + "(" + C_ID + " integer primary key autoincrement,"
            + C_NAME + " varchar(50) not null,"+C_PARENT+" integer,"+C_PICID+" integer not null)";
    private String name;
    private Integer id;
    private Integer parentId;
    private Integer picId;
    public Category() {
    }

    public Category(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Category(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getPicId() {
        return picId;
    }

    public void setPicId(Integer picId) {
        this.picId = picId;
    }
}
